package com.matt.domain.care;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.List;


/**
 * 药品交接记录
 */
@Entity
@Data
@Table(name = "hl_handover_record")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class HLHandoverRecord extends HLCareBaseRecord {

    @Column(columnDefinition = " varchar(2048)  COMMENT '宝贝状态'")
    private String situation;


    @Column(columnDefinition = " varchar(2048)  COMMENT '医嘱照片'")
    private String adviceImg;

    @Column(columnDefinition = " varchar(2048)  COMMENT '委托书照片'")
    private String attorneyImg;

    @Column(columnDefinition = " varchar(2048)  COMMENT '签字照片'")
    private String assignImg;

    
    @Column(columnDefinition = " varchar(32)  COMMENT '送药人姓名'")
    private String guardian;

    @Column(columnDefinition = " varchar(1024)  COMMENT '送药人照片'")
    private String guardianPhoto;

    @Column(columnDefinition = " bit(1) default 0 COMMENT '是否标记为已处理'", nullable = false)
    private Boolean processed = false;

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "handoverRecord")
    @OrderBy("created ASC")
    private List<HLHandoverRecordMedicine> medicines;

    @Column(columnDefinition = " bit(1) default 0 COMMENT '是否已读'")
    private Integer status;

    @Column(columnDefinition = " varchar(500)  COMMENT '内容'")
    private String content;

    @Column(columnDefinition = " varchar(32) COMMENT ' 对应班级id ' ")
    private String classesId;

    @Column(columnDefinition = " varchar(100) COMMENT ' 班级名称 ' ")
    private String classesName;

    @Column(columnDefinition = " varchar(100) COMMENT ' 创建人名称 ' ")
    private String createdByName;
//    @Transient
//    @JsonIgnore
//    private List<HLHandoverRecordMedicinePO> mds;
}
